package com.wwwc.index.web.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.*;
import javax.servlet.http.*;

public class PrintBean{

    public static StringBuffer getPrintButton(HttpServletRequest request, String name)
    {
	StringBuffer sbf = new StringBuffer();
	sbf.append("<FORM method=get action='"+request.getContextPath()+"/Print' target='_blank'>");
	sbf.append("<input type=submit name=B value='"+name+"' style='font-size:8pt'>");
	sbf.append("</FORM>");
	return sbf;
    }

    public static StringBuffer format(int w, int h, StringBuffer bsbf) {
	StringBuffer sbf = new StringBuffer();
	sbf.append("<HTML><HEAD><TITLE>3WCenter.com</TITLE>");
	sbf.append("<SCRIPT>");
	sbf.append("window.resizeTo("+w+","+h+");");
	sbf.append("</SCRIPT>");
	sbf.append("</HEAD>");
	sbf.append("<BODY><CENTER>");
	sbf.append("<TABLE width=100% height=100%><TR><TD align=center valign=top>");
	sbf.append(bsbf);
	sbf.append("</TD></TR>");
	sbf.append("<TR><TD align=center>");
	sbf.append("<BR><BR><img src='/images/copy_right.gif' border='0'>");
	sbf.append("</TD></TR>");
	sbf.append("</TABLE>");
	sbf.append("</CENTER></BODY></HTML>");
	return sbf;
    }
}

